package com.yiya.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.yiya.bean.Product;
import com.yiya.model.PriceRelModel;
import com.yiya.model.ProductCplex;
import com.yiya.model.ProductExample;
import com.yiya.model.ProductModel;

public interface ProductMapper {
    int countByExample(ProductExample example);

    int deleteByExample(ProductExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Product record);

    int insertSelective(Product record);

    List<Product> selectByExample(ProductExample example);

    Product selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Product record, @Param("example") ProductExample example);

    int updateByExample(@Param("record") Product record, @Param("example") ProductExample example);

    int updateByPrimaryKeySelective(Product record);

    int updateByPrimaryKey(Product record);
    
    List<ProductCplex> selectByModel(ProductModel record);
    
    int countByModel(ProductModel record);
    
    List<Product> queryAllList(ProductModel record);
    
    List<Product> queryAllListByMerchant(PriceRelModel record);
    
    Product queryByCode(ProductModel record);
    
    List<Product> queryOther(ProductModel record);
}